package com.lam.mall.api.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.lam.mall.entity.UserAddr;
import com.lam.mall.mapper.UserAddrMapper;

/**
 * 用户配送地址Service业务层处理
 * 
 * @author admin
 * @date 2023-04-26
 */
@Service
public class UserAddrApiService{

    @Autowired
    private UserAddrMapper userAddrMapper;
    
    public Long countByUserId(String userId) {
    	return userAddrMapper.selectCount(new LambdaQueryWrapper<UserAddr>().eq(UserAddr::getUserId, userId));
    }
	
}
